From: Juergen Gross Date: Wed, 23 Aug 2017 17:34:00 +0000 (+0200) Subject: xen/arch/x86/genapic/probe.c: let custom parameter parsing routines return errno X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1597 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=0c3a8459866d8fd3385d7fed71252f65903d419d;p=xen.git xen/arch/x86/genapic/probe.c: let custom parameter parsing routines return errno Modify the custom parameter parsing routines in: xen/arch/x86/genapic/probe.c to indicate whether the parameter value was parsed successfully. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/genapic/probe.c b/xen/arch/x86/genapic/probe.c index 9a147ff64a..af3745aa21 100644 --- a/xen/arch/x86/genapic/probe.c +++ b/xen/arch/x86/genapic/probe.c @@ -44,12 +44,17 @@ void __init generic_bigsmp_probe(void) } } -static void __init genapic_apic_force(char *str) +static int __init genapic_apic_force(const char *str) { - int i; + int i, rc = -EINVAL; + for (i = 0; apic_probe[i]; i++) - if (!strcmp(apic_probe[i]->name, str)) + if (!strcmp(apic_probe[i]->name, str)) { genapic = apic_probe[i]; + rc = 0; + } + + return rc; } custom_param("apic", genapic_apic_force);